# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=xdg-user-dirs
pkgver=0.17
pkgrel=0
arch="all"
url="https://www.freedesktop.org/wiki/Software/xdg-user-dirs"
pkgdesc="Manage user directories like ~/Desktop and ~/Music"
license="MIT AND GPL-2.0-only"
makedepends="autoconf automake libtool gettext-dev"
source="https://gitlab.freedesktop.org/xdg/xdg-user-dirs/-/archive/$pkgver/xdg-user-dirs-$pkgver.tar.gz"
subpackages="$pkgname-lang"

prepare() {
	default_prepare

	NOCONFIGURE=1 ./autogen.sh
}

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--disable-documentation # Broken, tries to load a network resource but fails
	make
}

package() {
	DESTDIR="$pkgdir" make install
}

sha512sums="d434bbf60514e7dce7a49965ae8a07216cd2917e5a21e8f5c3a1e086abdcc2a80afeace154cfb1b8c2ae73ea9993ee050af2869b8618d298362c60ec7951ec65  xdg-user-dirs-0.17.tar.gz"
